// ----------------------------------
// RSDK Project: Sonic 1/Sonic 2
// Script Description: Rock Object
// Script Author: Christan Whitehead/Simon Thomley
// Unpacked by Rubberduckycooly's script unpacker
// ----------------------------------

//-------Aliases-------//
private alias 43 : TYPE_ROCK

// Function declarations
reserve function Rock_DebugDraw
reserve function Rock_DebugSpawn

// Static Values

// Tables

function Rock_DebugDraw
	DrawSprite(0)
end function


function Rock_DebugSpawn
	CreateTempObject(TypeName[Rock], 0, object.xpos, object.ypos)
end function


event ObjectMain
	foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)
		BoxCollisionTest(C_BOX, object.entityPos, -16, -16, 16, 16, currentPlayer, HITBOX_AUTO, HITBOX_AUTO, HITBOX_AUTO, HITBOX_AUTO)
	next
end event


event ObjectDraw
	DrawSprite(0)
end event


event ObjectStartup
	LoadSpriteSheet("GHZ/Objects.gif")
	SpriteFrame(-24, -16, 48, 32, 1, 18)
	SetTableValue(TypeName[Rock], DebugMode_ObjCount, DebugMode_TypesTable)
	SetTableValue(Rock_DebugDraw, DebugMode_ObjCount, DebugMode_DrawTable)
	SetTableValue(Rock_DebugSpawn, DebugMode_ObjCount, DebugMode_SpawnTable)
	DebugMode_ObjCount++
end event

event RSDKDraw
	DrawSprite(0)
end event

event RSDKLoad
	LoadSpriteSheet("Global/Display.gif")
	SpriteFrame(-16, -16, 32, 32, 1, 143)
end event
